#include <iostream>
#include <thread>
#include <unistd.h>

#include "client/Configuration.h"
#include "server/Dictionary.h"
//#include "server/CandidateResult.h"
#include "server/KeyRecommander.h"
// #include "server/TaskQueue.h"
// #include "server/Thread.h"
// #include "server/Threadpool.h"

using std::thread;
using std::cout;

int main()
{
    Configuration *conf = Configuration::getInstance(getcwd(NULL, 0));
    conf->initConfiguration();

    const unsigned int CPUCoreNumber = std::thread::hardware_concurrency();

    Dictionary *dict = Dictionary::createInstance();
    string dictPath = *(conf->find_config("word_dictionary").begin());
    string indexPath = *(conf->find_config("word_index").begin());

    dict->init(dictPath, indexPath);

    KeyRecommander keyRecommand;
    cout << keyRecommand.doQuery("你好世界") << '\n';

}